import "./App.css";
import Home from "@/pages/Home";
import NotFound from "@/pages/NotFound";
import MinePage from "@/pages/MinePage";
import { Routes, Route } from "react-router-dom";
import { Suspense } from "react";
import ShopPage from "@/pages/ShopPage";
import MessagePage from "@/pages/MessagePage";
import AddPage from "@/pages/AddPage";
import FooterBar from "@/components/FooterBar";
import { LoadingOutlined } from "@ant-design/icons";
import SearchPage from "@/pages/SearchPage";

function App() {
  return (
    <>
      <Suspense
        fallback={
          <div>
            <LoadingOutlined />
            页面加载中...
          </div>
        }
      >
        <Routes>
          <Route path="/" element={<Home />}></Route>
          <Route path="/home" element={<Home />}></Route>
          <Route path="/mine" element={<MinePage />}></Route>
          <Route path="/shop" element={<ShopPage />}></Route>
          <Route path="/message" element={<MessagePage />}></Route>
          <Route path="/add" element={<AddPage />}></Route>
          <Route path="/search" element={<SearchPage />}></Route>
          <Route path="*" element={<NotFound />}></Route>
        </Routes>
        <FooterBar></FooterBar>
      </Suspense>
    </>
  );
}

export default App;
